package com.zara.store.server;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;

import com.zara.store.common.ProductVO;


@Entity
@DiscriminatorValue("Apparel")
public class Apparel extends Product {

	private String size;

	@Column
	public String getSize(){
		return size;
	}

	public void setSize(String newVal){
		size = newVal;
	}
	
	public Apparel() {
		// hib;
	}

	public Apparel(ProductVO productVO) {
		super(productVO);
		size = productVO.getSize();
	}
	
	@Override
	@Transient
	public ProductVO toVO() {
		ProductVO productVO = super.toVO();
		productVO.setType("Apparel");
		productVO.setSize(size);
		return productVO;
	}

}